﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

#endregion

using ScrumTable.Common.Collections;

namespace ScrumTable.DL.Data.Schema.ScrumTableV1
{
    /// <summary>
    /// Specifies an enumeration with the field names of 
    /// the task data access object.
    /// </summary>
    public class TaskSchema : SchemaBase
    {
        #region Declarations
        //--------------------------------------------------------------------
        // Declarations
        //--------------------------------------------------------------------

        /// <summary>
        /// Name for the title (or overview) field.
        /// </summary>
        /// <remarks>The value must be type of string.</remarks>
        public readonly SchemaBase Name = new NamedSchema(typeof(string));

        /// <summary>
        /// Name for the description task field.
        /// </summary>
        /// <remarks>The value must be type of string.</remarks>
        public readonly SchemaBase Description = new NamedSchema(typeof(string));

        /// <summary>
        /// Name for the stack rank task field.
        /// </summary>
        /// <remarks>The value must be type of double.</remarks>
        public readonly SchemaBase Ranking = new NamedSchema(typeof(double?));

        /// <summary>
        /// Name for the priority task field.
        /// </summary>
        /// <remarks>The value must be type of 32bit integer.</remarks>
        public readonly SchemaBase Priority = new NamedSchema(typeof (int?), allowedValues: new object[] {1, 2, 3, 4}, defaultValue: 2);

        /// <summary>
        /// Name for the estimate task field.
        /// </summary>
        /// <remarks>The value must be type of double.</remarks>
        public readonly SchemaBase Estimate = new NamedSchema(typeof(double?));

        /// <summary>
        /// Name for the completed work task field.
        /// </summary>
        /// <remarks>The value must be type of double.</remarks>
        public readonly SchemaBase CompletedWork = new NamedSchema(typeof(double?));

        /// <summary>
        /// Name for the remaining work task field.
        /// </summary>
        /// <remarks>The value must be type of double.</remarks>
        public readonly SchemaBase RemainingWork = new NamedSchema(typeof(double?));

        /// <summary>
        /// Name for the state task field.
        /// Its value could be for example "Active", "InProgress" or "Closed".
        /// </summary>
        /// <remarks>The value must be type of string.</remarks>
        public readonly SchemaBase State = new NamedSchema(typeof(string));

        /// <summary>
        /// Name for the memberid task field.
        /// </summary>
        /// <remarks>The value must be type of ValueChain&gt;string&lt;.</remarks>
        public readonly SchemaBase MemberId = new NamedSchema(typeof(ValueChain<string>), isSchemaReference: true);

        #endregion

        #region Constructors / Destructor
        //--------------------------------------------------------------------
        // Constructors / Destructor
        //--------------------------------------------------------------------

        /// <summary>
        /// Do not create global instances of this class.
        /// </summary>
        internal protected TaskSchema()
        {
        }

        #endregion
    }
}
